<?php
namespace app\common\enum\notice;

/**
 * 邮箱枚举
 * Class EmailEnum
 * @package app\common\enum
 */
class EmailEnum
{
    /**
     * 发送状态
     */
    const SEND_ING = 0;
    const SEND_SUCCESS = 1;
    const SEND_FAIL = 2;

    /**
     * 邮件场景
     */
    const REG_CAPTCHA = 1;
    const RESET_LOGIN_PASSWORD_CAPTCHA = 2;


    /**
     * @notes 获取场景描述
     * @param $sceneId
     * @param false $flag
     * @return string|string[]
     * @author 段誉
     * @date 2022/3/29 11:33
     */
    public static function getSceneDesc($sceneId, $flag = false)
    {
        $desc = [
            self::REG_CAPTCHA => '注册验证码',
            self::RESET_LOGIN_PASSWORD_CAPTCHA => '重置登录密码验证码',
        ];

        if ($flag) {
            return $desc;
        }

        return $desc[$sceneId] ?? '';
    }

}